package com.thiswhyme.republish.demo.rabbitmq;

import org.springframework.cloud.stream.annotation.Input;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;

/**
 * @description: message通道demo
 * @author: thiswhyme
 * @date: 2020/9/16
 */
public interface DemoChannel {

    String OUTPUT_CHANNEL_LOG = "logOutputChannel";
    String OUTPUT_CHANNEL_CONFIRM = "confirmOutputChannel";
    String OUTPUT_CHANNEL_RETRY = "retryOutputChannel";

    @Output(OUTPUT_CHANNEL_LOG)
    MessageChannel logOutputChannel();

    @Output(OUTPUT_CHANNEL_CONFIRM)
    MessageChannel confirmOutputChannel();

    @Output(OUTPUT_CHANNEL_RETRY)
    MessageChannel retryOutputChannel();


    String INPUT_CHANNEL_LOG = "consumerLogInputChannel";
    String INPUT_CHANNEL_CONFIRM = "confirmInputChannel";
    String INPUT_CHANNEL_RETRY = "retryInputChannel";

    @Input(INPUT_CHANNEL_LOG)
    SubscribableChannel logInputChannel();

    @Input(INPUT_CHANNEL_CONFIRM)
    SubscribableChannel confirmInputChannel();

    @Input(INPUT_CHANNEL_RETRY)
    SubscribableChannel retryInputChannel();
}
